﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace PeerComLink
{
    public class WaveFormatParam
    {
        public int AverageBytesPerSecond
        {
            get
            {
                return SamplesPerSecond * BlockAlign;
            }
        }
        public int BitsPerSample { get; private set; }
        public int BlockAlign
        {
            get
            {
                return Channels * BitsPerSample / 8;
            }
        }
        public int Channels { get; private set; }
        public int SamplesPerSecond { get; private set; }

        public WaveFormatParam(int samplesPerSecond, int channels, int bitsPerSample)
        {
            SamplesPerSecond = samplesPerSecond;
            Channels = channels;
            BitsPerSample = bitsPerSample;
        }
    }
}
